//
// Created by Tiany on 2021/6/22.
//链表类型队列测试类

#include "LinkQueue.h"
#include "stdio.h"

static void LinkQueueTest(void) {
    struct DataType x[] = {141, 15, 1, 31, 6, 1, 23, 531, 1, 1, 31, 51, 4,36};
    int length = sizeof(x) / sizeof(x[0]);
    PLinkQueue pLinkQueue;
    pLinkQueue = createEmptyQueue_link();/*创建空队列*/
    writeInQueue_link(pLinkQueue, x, length);/*数据全部写入队列*/
    readAllQueue_link(pLinkQueue);/*读出全部队列数据*/

    printf("\n入队\n");
    enQueue_link(pLinkQueue, x[1]);/*元素15入队*/
    readAllQueue_link(pLinkQueue);

    printf("\n出队\n");
    deQueue_link(pLinkQueue);/*队头元素出队*/
    readAllQueue_link(pLinkQueue);
}


